<?php

namespace Admin;

return array(
	'controllers' => array(
		'invokables' => array(
			'Admin\Controller\Product'	=> 'Admin\Controller\ProductController',
			'Admin\Controller\Category' => 'Admin\Controller\CategoryController',
		)
	),
	'router' => array(
		'routes' => array(
			'product'	=> array(
				'type'	=> 'segment',
				'options'	=> array(
					'route'	=> '/admin/product[/][:action][/:id]',
					'constraints'	=> array(
						'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                        'id'     => '[0-9]+',
					),
					'defaults'	=> array(
						'controller'	=> 'Admin\Controller\Product',
						'action'		=> 'index',
					)
				)
			), //product
			'category' => array(
				'type' => 'segment',
				'options' => array(
					'route' => '/admin/category[/][:action][/:id]',
					'constraints' => array(
						'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
						'id' => '[0-9]+',
					),
					'defaults' => array(
						'controller' => 'Admin\Controller\Category',
						'action' => 'index',
					)
				)
			) //category
		) // routes
	),
	'view_manager' => array(
		'template_path_stack' => array(
			'admin' => __DIR__ . '/../view',
		),
	),
);